package com.hsgene.order.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hsgene.common.util.date.TimeJsonDeserializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单优惠信息
 *
 * @author wangbing
 * @version 1.0, 2018/8/3
 */
@Deprecated
public class OrderMallDiscounts implements Serializable {

    private static final long serialVersionUID = 989434515025281351L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 主订单id（order_mall:id）
     */
    private String mainOrderId;

    /**
     * 子订单id（order_mall_item_basic:id）
     * <p>
     * 子订单不为空，表示此项优惠针对单独子订单
     * 为空表示对总订单进行优惠
     * </p>
     */
    private String itemOrderId;

    /**
     * 优惠类型
     */
    private String type;

    /**
     * 优惠金额
     */
    private BigDecimal amount;

    /**
     * 优惠关联id
     */
    private String relationId;

    /**
     * 优惠信息JSON-快照
     */
    private String relationJson;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMainOrderId() {
        return mainOrderId;
    }

    public void setMainOrderId(String mainOrderId) {
        this.mainOrderId = mainOrderId;
    }

    public String getItemOrderId() {
        return itemOrderId;
    }

    public void setItemOrderId(String itemOrderId) {
        this.itemOrderId = itemOrderId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getRelationJson() {
        return relationJson;
    }

    public void setRelationJson(String relationJson) {
        this.relationJson = relationJson;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
